<template>
	<div>
		<h1>Vue3的home</h1>
		<hr />
		{{ str }}
		<hr />
		computed:{{ changeStr }}
		<hr />
		<input type="" name="" v-model="changeStr" />
	</div>
</template>

<script setup>
let str = ref('这是数据');
const changeStr = computed({
	get() {
		console.log(str.value);
		return str.value;
	},
	set(val) {
		str.value = val;
	}
});
</script>

<style></style>
